package org.wisdom.ac.domain.resource.entity;

import javax.persistence.*;

import org.wisdom.data.jpa.entity.BaseEntity;

import lombok.*;
import lombok.extern.slf4j.Slf4j;

/**
 * 系统资源
 *
 * @author 张智研
 * @date 2022/05/23 15:08
 **/
@SuppressWarnings("JpaDataSourceORMInspection")
@EqualsAndHashCode(callSuper = true)
@Entity
@Inheritance(strategy = InheritanceType.JOINED)
@DiscriminatorColumn(name = "resourceType", discriminatorType = DiscriminatorType.INTEGER)
@DiscriminatorValue(value = "0")
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString(callSuper = true)
@Slf4j
public class AcResource extends BaseEntity {
    /** 资源标识 */
    private String code;

    /** 资源标题 */
    private String title;

    /** 权限标识 */
    private String permission;

    /** 资源类型 */
    @Column(insertable = false, updatable = false)
    private Integer resourceType;

    /** 是否外链 */
    @Column(nullable = false)
    private Boolean outside;

    /** 是否隐藏 */
    @Column(nullable = false)
    private Boolean hidden;

    /** 状态 */
    @Column(nullable = false)
    private Boolean status;
}
